<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
  </script>
  
  
  
  <div class="h"><a href="{:U('index')}" class="btn btn-info"><i class="glyphicon glyphicon-circle-arrow-left"></i> 返回微信菜单</a>
 
 </div>
  
  
  

    <form class="checkoutform form-horizontal" action="{:U('insert')}" method="post">
    
    
    
    <div class="table_ container">
      
      
      
      
  
     <div class="setting_table">
    
    
    
    
    
    
    
    
    
    
    
      
    <div class="form-group">
      <label class="col-sm-2 control-label">菜单名称</label>
      <div class="col-sm-10">
         <input class="form-control" datatype="*" value="{$info.name}" name="name" type="text" placeholder="菜单名称">
      </div>
   </div>
    
    
    <if condition="!isset($_GET['id'])">
    
    <div class="form-group">
      <label class="col-sm-2 control-label">父级菜单</label>
      <div class="col-sm-10"><select class="form-control" name="pid">
        <option value="0">请选择</option>
        <volist name="pid_list" id="vo">
        	<option <eq name="vo['id']" value="$info['pid']">selected="selected"</eq> value="{$vo.id}">{$vo.name}</option>
            </volist>
        </select>
         
      </div>
   </div>
    <else/>
    <input class="form-control" value="{$_GET['id']}" name="pid" type="hidden" >
    </if>
    
    
    
    <div class="form-group">
      <label class="col-sm-2 control-label">类型</label>
      <div class="col-sm-10">
               
   
         <label class="checkbox-inline"> <input name="type" type="radio" id="type_0" value="click" <eq name="info['type']" value="click">checked="checked"</eq> />
          关键字</label>
          <label class="checkbox-inline">  <input type="radio" name="type" value="view" id="type_1" <eq name="info['type']" value="view">checked="checked"</eq> />
          URL跳转</label>
      
      </div>
   </div>
   
   
   
   
   
   
   <div class="form-group">
      <label class="col-sm-2 control-label">关键字或URL</label>
      <div class="col-sm-10">
        <input class="form-control" datatype="*" value="{$info.key_or_url}" name="key_or_url" type="text" placeholder="关键字或URL">
         
      </div>
   </div>
   
   
    
    
    
    
    
    </div>
    
    </div>
    
    
    <input name="id" type="hidden" value="{$info.id}" />
      <div class="pages"><button type="submit" class="btn btn-success">保存</button></div>
    </form>
  </div>
  <div class="clear"></div>
</div>
</body></html>